<template>
	<view>
		<view class="" style="padding-bottom: 180rpx;">
			<u-swiper :list="dataAll.images_text" height="284" circular></u-swiper>
			<view class="block mainpadding ffffff">
				<view class="zhonghei sanshier fonweight ">{{dataAll.name}}</view>
				<view class="flexbetween flex_wrap">
					<view class="wushi margin_top" v-for="(value,key,index) in dataAll.attr_text" :key="key">
						<view class="flexleft">
							<view class="ershib xiaohui margin_right1">{{value}}</view>
							<view class="ershib zhonghei ">{{key}}</view>
						</view>
					</view>

				</view>
			</view>
			<view class="ffffff mainpadding ">
				<u-parse :content="dataAll.content"></u-parse>
			</view>
		</view>
		<view class="gudingdb ffffff mainpadding flexbetween">
			<view class="xiaocheng strongtext">￥
				<text class="bigtext fonweight xiaocheng">{{dataAll.salesprice}}</text>
			</view>
			<view class="huabtn flexcenter" @click="goYuDing(listid)">立即预定</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")

	export default {
		data() {
			return {
				listid: "",
				dataAll: {},
				pageShow: false
			}
		},
		onLoad(options) {
			this.listid = options.id
			this.init()
		},
		methods: {
			init() {
				httpRequest.request('/api/hotelcl/hotelTypeDetail', 'GET', {
					id: this.listid
				}, false, false, false).then(res => {
					this.dataAll = res.data
					this.pageShow = true
				})
			},
			// 跳转预定
			goYuDing(id) {
				if (!httpRequest.checkIsLogin()) {
					uni.navigateTo({
						url: "/pages/login/login"
					})
					return false;
				}
				uni.navigateTo({
					url: '/pages_index/yudingjiudian?id=' + id
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.huabtn {
		width: 295rpx;
		height: 80rpx;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		font-size: 32rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		color: #FFFFFF;
		background-color: #FF9341;
	}

	.huangbox {
		background-color: #fff5ec;
		padding: 4rpx 7rpx;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		font-size: 22rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		color: #FF9341;
	}

	.fenbox {
		background-color: #fff0ef;
		padding: 4rpx 7rpx;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		font-size: 22rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		color: #FB605C;
	}

	.block {
		position: relative;
		top: -30rpx;
		border-radius: 39rpx 39rpx 0rpx 0rpx;
	}
</style>